home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 15563 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  839 b 

  1. Path: keats.ugrad.cs.ubc.ca!not-for-mail
  2. From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Defeat password by C
  5. Date: 19 Apr 1996 11:29:46 -0700
  6. Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
  7. Message-ID: <4l8m2qINNi33@keats.ugrad.cs.ubc.ca>
  8. References: <4l4cns$gs0@usenetp1.news.prodigy.com> <4l4n57INNb5g@keats.ugrad.cs.ubc.ca> <4l8832$9jb@abel.cc.sunysb.edu>
  9. NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
  10.  
  11. In article <4l8832$9jb@abel.cc.sunysb.edu>,
  12. DK <dkat@psych1.psy.sunysb.edu> wrote:
  13. >>main()
  14. >>{
  15. >>    char pass[] = "mylamepassword";
  16. >
  17. >>    pass[8] = 0;
  18.  
  19. >/* do you mean pass[8] = '\0'; ?  if so why?  if not what does this
  20.  
  21. No, I meant pass[8] = 0, which does the same thing. 
  22.  
  23. It breaks the password in two.
  24.  
  25. You need to learn about integral promotion, K&R2, Appendix A, 6.1.
  26.